{% extends 'bootstrap5/admin/base.html' %}
{% block content %}
    <h2>图片记录</h2>
    <table class="table table-striped">
        <thead>
        <tr>
            <th>ID</th>
            <th>文件名</th>
            <th>预览</th>
            <th>来源链接</th>
            <th>上传 IP</th>
            <th>时间</th>
        </tr>
        </thead>
        <tbody>
        {% for img in images %}
            <tr>
                <td>{{ img.id }}</td>
                <td>{{ img.filename }}</td>
                <td><img src="{{ img.filepath }}"  alt="" style="height: 50px"></td>
                <td><a href="{{ img.source_url }}" target="_blank">{{ img.source_url }}</a></td>
                <td>{{ img.upload_ip }}</td>
                <td>{{ img.created_at.strftime('%Y-%m-%d %H:%M:%S') }}</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endblock %}
